<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" 
	import="java.util.List,com.telecom.cms.dao.*,com.telecom.cms.dto.*" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
	<title>预约取数</title>
	<LINK href="css/default.css" rel=stylesheet>
	<LINK href="css/button.css" rel=stylesheet>
	<LINK href="css/main.css" type=text/css rel=stylesheet>
	<script type="text/javascript" src="js/dtree.js"></script>
<script type="text/javascript">
	function opchange(o){
		document.all.method.value=o;
		document.forms[0].submit();
	}
</script>
</head>
<body>
<html:form action="/idaCustom">
<table width="770" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
	<tr>
		<td width="3" height="31">
			<img height="31" src="./images/table_01.gif" width="3" />
		</td>
		<td background="./images/table_02.gif" height="31">
			<table cellspacing="0" cellpadding="0" width="170" align="left" border="0">
				<tbody>
					<tr>
						<td width="51" background="./images/title_1_bg.gif">
							<img height="31" src="./images/title_1.gif" width="51" />
						</td>
						<td width="150" background="./images/title_1_bg.gif">
							<span class="color_b_666">预约取数</span>
						</td>
					</tr>
				</tbody>
			</table>
		</td>
		<td width="3">
			<img height="31" src="./images/table_03.gif" width="3" />
		</td>
	</tr>
	<tr>
		<td background="images/table_04.gif">
			<img height="5" src="images/table_04.gif" width="3">
		</td>
		<td style="PADDING-TOP: 3px" valign="top" align="center">
			<logic:present name="bookingList" scope="request">
			<table width='100%' border='0' cellspacing='' cellpadding='2'>
				<tr>
					<td align="left" colspan="2">
						<table width='100%' border='0' cellspacing='1' cellpadding='2'>
							<tr align="center" height="25">
								<td background="images/table_bg0.GIF">预约编号</td>
								<td background="images/table_bg0.GIF">预约名称</td>
								<td background="images/table_bg0.GIF">预约人</td>
								<td background="images/table_bg0.GIF">预约时间</td>
								<td background="images/table_bg0.GIF">时限要求</td>
								<td background="images/table_bg0.GIF">状态</td>
								<td background="images/table_bg0.GIF">操作</td>
							</tr>
							<logic:iterate name="bookingList" id="b">
							<tr align="center" height="20">
								<td>${b.bookingId}</td>
								<td>${b.bookingName}</td>
								<td>${b.bookingUser}</td>
								<td>${b.bookingTime}</td>
								<td>${b.timeLimit}</td>
								<td>${b.status}</td>
								<td><a href="idaCustom.do?method=runIdaBooking&bookingId=${b.bookingId}">查看</a></td>
							</tr>
							</logic:iterate>
						</table>
					</td>
				</tr>
			</table>
			</logic:present>
			<br>
			<logic:notPresent name="booking" scope="request">
			<table width='80%' border='0' cellspacing='1' cellpadding='2'>
				<tr height="25">
					<th colspan="2" align="center">新建预约取数</th>
				</tr>
				<tr>
					<td align='center' width='20%'>预约取数名称</td>
					<td width='80%'>
						<input type="text" name="bookingName" value="" size="60" />
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>取数内容要求</td>
					<td width='80%'>
						<textarea name="requirement" cols="60" rows="5"></textarea>
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>取数目的</td>
					<td width='80%'>
						<textarea name="purpose" cols="60" rows="5"></textarea>
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>时限要求</td>
					<td width='80%'>
						<select name="timeLimit">
							<option value="一天内">一天内</option>
							<option value="两天内">两天内</option>
							<option value="三天内">三天内</option>
							<option value="一周内" selected>一周内</option>
							<option value="一月内">一月内</option>
						</select>
					</td>
				</tr>
				<tr>
					<td align="center" valign="middle" colspan="2">
						<img src='images/button_addnew.gif' width="63" height="21" onclick="opchange('insertBooking')" />
						&nbsp;&nbsp;
						<img src='images/button_cancel.gif' width="63" height="21" onclick="opchange('runIdaBooking')" />
					</td>
				</tr>
			</table>
			</logic:notPresent>
			<logic:present name="booking" scope="request">
				<input type="hidden" name="bookingId" value="${booking.bookingId}" />
				<table width='80%' border='0' cellspacing='1' cellpadding='2'>
				<tr height="25">
					<th colspan="2" align="center">${booking.bookingName}</th>
				</tr>
				<tr>
					<td align='center' width='20%'>预约取数名称</td>
					<td width='80%'>
						<input type="text" name="bookingName" value="${booking.bookingName}" size="60" />
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>取数内容要求</td>
					<td width='80%'>
						<textarea name="requirement" cols="60" rows="5">${booking.requirement}</textarea>
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>取数目的</td>
					<td width='80%'>
						<textarea name="purpose" cols="60" rows="5">${booking.purpose}</textarea>
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>时限要求</td>
					<td width='80%'>
						<select name="timeLimit">
							<option value="一天内" <logic:equal name="booking" property="timeLimit" value="一天内">selected</logic:equal>>一天内</option>
							<option value="两天内" <logic:equal name="booking" property="timeLimit" value="两天内">selected</logic:equal>>两天内</option>
							<option value="三天内" <logic:equal name="booking" property="timeLimit" value="三天内">selected</logic:equal>>三天内</option>
							<option value="一周内" <logic:equal name="booking" property="timeLimit" value="一周内">selected</logic:equal>>一周内</option>
							<option value="一月内" <logic:equal name="booking" property="timeLimit" value="一月内">selected</logic:equal>>一月内</option>
						</select>
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>处理结果</td>
					<td width='80%'>
						<textarea name="processResult" cols="60" rows="5">${booking.processResult}</textarea>
					</td>
				</tr>
				<tr>
					<td align='center' width='20%'>状态</td>
					<td width='80%'>
						<select name="status">
							<option value="新建" <logic:equal name="booking" property="status" value="新建">selected</logic:equal>>新建</option>
							<option value="打回" <logic:equal name="booking" property="status" value="打回">selected</logic:equal>>打回</option>
							<option value="已解释" <logic:equal name="booking" property="status" value="已解释">selected</logic:equal>>已解释</option>
							<option value="已解决" <logic:equal name="booking" property="status" value="已解决">selected</logic:equal>>已解决</option>
							<option value="已关闭" <logic:equal name="booking" property="status" value="已关闭">selected</logic:equal>>已关闭</option>
						</select>
						<logic:notEqual name="booking" property="status" value="新建">
							&nbsp;&nbsp;&nbsp;&nbsp;处理人：${booking.processUser}
							&nbsp;&nbsp;处理时间：${booking.processTime}
						</logic:notEqual>
					</td>
				</tr>
				<tr>
					<td align="center" valign="middle" colspan="2">
						<img src='images/button_modify.gif' width="63" height="21" onclick="opchange('updateBooking')" />
						&nbsp;&nbsp;
						<img src='images/button_delete.gif' width="63" height="21" onclick="opchange('deleteBooking')" />
						&nbsp;&nbsp;
						<img src='images/button_exit.gif' width="63" height="21" onclick="opchange('runIdaBooking')" />
					</td>
				</tr>
			</table>
			</logic:present>
		</td>
		<td background="images/table_05.gif">
			<img height="5" src="images/table_05.gif" width="3">
		</td>
	</tr>
	<tr height="3">
		<td height="3">
			<img height="12" src="images/table_06.gif" width="3">
		</td>
		<td height="3">
			<img height="3" src="images/table_07.gif" width="764">
		</td>
		<td height="3">
			<img height="12" src="images/table_08.gif" width="3">
		</td>
	</tr>
</tbody>
</table>
<br />
<html:hidden property="method" value="runIdaBooking" />
</html:form>
</body>
</html>